package com.eqdd.yiqidian.utils;


import com.google.gson.Gson;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class NewGsonUtil<T> extends ABGsonUtil<T>{

	public NewGsonUtil(String s) {
		T data = null;
		Gson gson = new Gson();
		Type genericSuperclass = getClass().getGenericSuperclass();
		Type type = ((ParameterizedType) genericSuperclass).getActualTypeArguments()[0];
		data = gson.fromJson(s, type);
		onCall(data);
	}
}
